import React from "react";
import "@/layouts/Recommended.css";
// 头部 搜索框部分
import Top from "@/components/Recommend/Recomheader";
// 轮播图部分
import Swiper from "@/components/Recommend/Swiper";
// 活动卡片
import Activity from "@/components/Recommend/Activity";

// 今日推荐
import { useSelector } from "react-redux";
import Recommend from "@/components/Recommend/Recommend";
import { selectSinglecards } from "@/store/configureStore/reducer";

function Recommended() {
  const cardsingle = useSelector(selectSinglecards);

  const data: any = [
    {
      title: "今日推荐",
      span: "开通会员免费用",
    },
  ];

  const commos: any = [
    { com: "精选推荐" },
    { com: "热门关注" },
    { com: "儿童节" },
    { com: "高考加油" },
    { com: "端午节" },
    { com: "618" },
    { com: "父亲节" },
  ];

  return (
    <div className="recommend_main">
      {/* 头部 */}
      <Top></Top>
      {/* 轮播图 */}
      <Swiper></Swiper>
      {/* 活动卡片 */}
      <Activity></Activity>
      {/* 今日推荐 */}
      <Recommend
        Inform={data}
        commos={commos}
        onlycard={cardsingle}
      ></Recommend>

      {/* 推荐下面图片 */}
      <div className="Img_main">
        <img src="//images.weserv.nl/?url=https://asset.eqh5.com/719b855a25d34394aca8ffe56bdad2db.jpg?imageMogr2/quality/80/format/webp/" />
      </div>
    </div>
  );
}

export default Recommended;
